#ifndef GAMEKIT_H
#define GAMEKIT_H

//#ifndef __WIN32__
//#ifdef WIN32
//#define __WIN32__ 1
//#endif
//#endif

#ifdef __WIN32__
#define GK_API __declspec(dllexport)
#else
#define GK_API 
#endif

#ifdef __WIN32__ 

#define EXPORT_STL_MAP( dllmacro, mapkey, mapvalue ) \
	template struct dllmacro std::pair< mapkey, mapvalue >; \
	template class  dllmacro std::allocator<std::pair<const mapkey, mapvalue> >; \
	template class  dllmacro std::allocator< std::_Tree_nod<std::_Tmap_traits<mapkey, mapvalue,std::less<mapkey>,std::allocator<std::pair<const mapkey, mapvalue>>,false>>::_Node*>; \
	template class  dllmacro std::allocator< std::_Tree_nod<std::_Tmap_traits<mapkey, mapvalue,std::less<mapkey>,std::allocator<std::pair<const mapkey, mapvalue>>,false>>::_Node>; \
	template struct dllmacro std::less<mapkey>; \
	template class  dllmacro std::allocator<std::_Tree_ptr<std::_Tmap_traits<mapkey,mapvalue,std::less<mapkey>, std::allocator<std::pair<const mapkey,mapvalue> >,false> > >; \
	template class  dllmacro std::allocator<std::_Tree_nod<std::_Tmap_traits<mapkey,mapvalue,std::less<mapkey>, std::allocator<std::pair<const mapkey,mapvalue> >,false> > >; \
	template class  dllmacro std::_Tree_nod<std::_Tmap_traits<mapkey,mapvalue,std::less<mapkey>, std::allocator<std::pair<const mapkey,mapvalue> >,false> >; \
	template class  dllmacro std::_Tree_ptr<std::_Tmap_traits<mapkey,mapvalue,std::less<mapkey>, std::allocator<std::pair<const mapkey,mapvalue> >,false> >; \
	template class  dllmacro std::_Tree_val<std::_Tmap_traits<mapkey,mapvalue,std::less<mapkey>, std::allocator<std::pair<const mapkey,mapvalue> >,false> >; \
	template class  dllmacro std::map<mapkey, mapvalue, std::less< mapkey >, std::allocator<std::pair<const mapkey,mapvalue> > >; \
	template class  dllmacro std::_Tmap_traits<mapkey, mapvalue, std::less<mapkey>, std::allocator<std::pair<const mapkey, mapvalue> >, false>;

#define EXPORT_STL_VECTOR( dllmacro, vectype ) \
	template class dllmacro std::allocator< vectype >; \
	template class dllmacro std::vector<vectype, std::allocator< vectype > >;

#define EXPORT_STL_SET(declspec_, T_) \
	template class declspec_ std::allocator<T_ >; \
	template struct declspec_ std::less<T_ >; \
	template class declspec_ std::allocator<std::_Tree_nod< std::_Tset_traits<T_, std::less<T_ >, std::allocator<T_ >, false> >::_Node>; \
	template class declspec_ std::allocator<std::_Tree_ptr< std::_Tset_traits<T_, std::less<T_ >, std::allocator<T_ >, false> >::_Node*>; \
	template class declspec_ std::set<T_ >;

#else
#define EXPORT_STL_MAP(dllmacro, mapkey, mapvalue )
#define EXPORT_STL_SET(declspec, value)
#define EXPORT_STL_VECTOR(dllmacro, value)
#endif

#define GK_LIL_ENDIAN	1234
#define GK_BIG_ENDIAN	4321

#ifndef GK_BYTEORDER
#if defined(__hppa__) || \
    defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
    (defined(__MIPS__) && defined(__MISPEB__)) || \
    defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \
    defined(__sparc__)
#define GK_BYTEORDER	GK_BIG_ENDIAN
#define GK_BIGENDIAN
#else
#define GK_BYTEORDER	GK_LIL_ENDIAN
#define GK_LILENDIAN
#endif
#endif

#define GK_UNUSED(p) (void)p;

#ifndef NULL
#define NULL 0
#endif

#include "gamekit.types.h"

#endif
